// 后端返回的文件数据接口
export interface FileListResponse {
    size: number;
    name: string;
    etag: string;
    attachmentId: number;
    uploadTime: string;
    url: string;
    fileType: string;
    order: number;
}

// 文件类型枚举
export enum FileType {
    FOLDER = 'folder',
    IMAGE = 'image',
    DOCUMENT = 'document',
    VIDEO = 'video',
    AUDIO = 'audio',
    EXECUTABLE = 'executable',
    ARCHIVE = 'archive',
    TEXT = 'text',
    DATA = 'data',
    OTHER = 'other'
}

// 前端使用的文件项接口
export interface FileItem {
    id: string;
    name: string;
    type: FileType | string;
    size: number;
    updateTime: Date;
    path: string;
    url?: string;
    mimeType?: string;
    order?: number;
}

// 上传响应接口
export interface UploadResponse {
    code: number;
    data: {
        fileId: string;
        url: string;
    };
    message: string;
}

export interface UploadChunkResponse {
    code: number;
    message: string;
    data?: {
        uploaded: boolean;
    };
}

export interface MergeFileResponse {
    code: number;
    message: string;
    data?: {
        fileId: string;
        url: string;
    };
} 